5 The Grand Visualization
Note: We don’t have enough colors! The colors are recycled but hopefully will still help. Cluster numbers in tooltip for certainty
clusters = factor(clus$cluster[index_subset])
fig <- plot_ly(type = 'scatter', mode = 'markers')
fig <- fig %>%
add_trace(
x = data_subset[,1],
y = data_subset[,2],
text = ~paste('Heading:', head_subset ,"$<br>Text: ", raw_text_subset ,"$<br>Cluster Number: ", clusters),
hoverinfo = 'text',
color=clusters,
marker = list( opacity=0.6),
showlegend = F
)
fig